package ${package}.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ${package}.base.ISimpleService;
import ${package}.dao.ExampleDao;
import ${package}.entity.ExampleEntity;

@Service
public class ExampleService implements ISimpleService<ExampleEntity> {

	@Autowired
	ExampleDao dao;
	
	@Override
	public ExampleEntity add(ExampleEntity exampleEntity) {
		dao.insert(exampleEntity);
		return exampleEntity;
	}
	
	@Override
	public void remove(long id) {
		dao.deleteByPk(id);
	}
	
	@Override
	public void modify(ExampleEntity entity) {
		dao.updateByPk(entity);
	}
	
	@Override
	public ExampleEntity get(long id) {
		return dao.selectByPk(id);
	}

	@Override
	public List<ExampleEntity> query(ExampleEntity example) {
		return dao.selectByExample(example);
	}
	
}
